<#include "/common/layout.html">
<@header>
</@header>
<@body>
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      <small>收款管理 > 账单维护</small>
    </h1>
  </section>
  <!-- Main content -->
  <section class="content">
    <!-- Your Page Content Here -->
    <div class="row">
      <div class="col-xs-12">
        <div class="box">
           <form action="/collection/bill/list/1" method="post" class="form-inline">
	          <div class="box-header">
                  <div class="input-group">
                      <input type="text" name="search" value="${search!}" class="form-control" placeholder="Search">
                      <div class="input-group-btn">
                          <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                          <a href="/collection/bill/list/1" class="btn btn-default"><i class="fa fa-refresh"></i></a>
                      </div>
                  </div>
	          </div><!-- /.box-header -->
           </form>
          <div class="box-body table-responsive no-padding">
            <table class="table table-hover">
              <tr>
                <th>房间编号</th>
                <th>所属年月</th>
                <th>租客姓名</th>
                <th>实用水量(吨)</th>
				<th>实用电量(度)</th>
                <th>房租总费用</th>
                <th>缴纳标志</th>
                <th width="120px">操作</th>
              </tr>
              <#list pageData.getRecords() as billInfo>
              	  <tr>
	                <td>${(billInfo.roomName)!}</td>
	                <td>${(billInfo.month)!}</td>
                      <td>${(billInfo.tenantName)!}</td>
                      <td>${(billInfo.realUseWater)!}</td>
                      <td>${(billInfo.realUseEle)!}</td>
                      <td>${(billInfo.totalFees)!}</td>
                      <td><#if billInfo.payFlag=="Y"><font color="gree">已缴纳</font><#else><font color="red">未缴纳</font></#if></td>
	                <td>
	                	<@shiro.hasPermission name="editBillInfo">
                        <a class="btn bg-danger btn-xs"
                           data-tiggle="ajax"
                           data-submit-url="/collection/bill/setStatus?roomName=${(billInfo.roomName)!}&month=${(billInfo.month)!}"
                           data-confirm="您确定要设置该条记录为已缴纳吗?">设置已缴纳</a>
	                	</@shiro.hasPermission>
                         <a class="btn btn-primary btn-xs dialog" href="javascript:;" data-url="/collection/bill/detail?roomName=${(billInfo.roomName)!}&month=${(billInfo.month)!}" data-title="查看账单详细信息" data-width="850" data-height="550">详情</a>
	                </td>
	              </tr>
              </#list>
            </table>
          </div><!-- /.box-body -->
          <div class="box-footer row">
            <div class="col-md-6">
         	  <#include "/common/paginateBar.html" />
	  		  <@paginate pageData=pageData actionUrl="/collection/bill/list/" urlParas="?search=${search!}&daterange=${daterange!}"  />
            </div>
            <div class="col-md-6 pull-left">
	             <#include "/common/paginate.html" />
	  			 <@paginate currentPage=pageData.getCurrent() totalPage=pageData.getPages() actionUrl="/collection/bill/list/" urlParas="?search=${search!}&pageSize=${pageSize!}"  />
            </div>
          </div>
        </div><!-- /.box -->
      </div>
    </div>
  </section><!-- /.content -->
</div><!-- /.content-wrapper -->
</@body>
<@footer>
</@footer>